﻿using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Util;
using Coldairarrow.Util.Utilities;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;


namespace Coldairarrow.Business.Base_Manage
{
    public interface IBuildSuperCodeBusiness
    {
        Task<object> GetTableTree();
        Task<WebResponseContent> SaveEidt(Sys_TableInfo tableInfo);
        Task<object> LoadTable(int parentId, string tableName, string columnCNName, string nameSpace, string foldername, int table_Id, bool isTreeLoad);
        Task<WebResponseContent> DelTree(int table_Id);
        Task<object> SyncTable(string tableName);
        Task<WebResponseContent> CreateEntityModel(Sys_TableInfo tableInfo);
        string CreateServices(string tableName, string nameSpace, string foldername, bool v1, bool v2);
        string BuildSuperCode(BuildSuperInputDTO input);
        string CreateVuePage(Sys_TableInfo sysTableInfo);
        Task<List<BuilderCodeTreeDTO>> GetBuildListTree();
        Task<object> LoadTable(TabeInfo input);
        string BuildVueCode(BuildSuperInputDTO input);
    }
    public class APIDTO
    {
        public string Id { get; set; } = IdHelper.GetId();
        public string Path { get; set; }
        public string Method { get; set; }
        public string summary { get; set; }
        public string ControllerName { get; set; }
        public Boolean IsCheck { get; set; } = false;
        //public List<APIDTO> children { get; set; } = new List<APIDTO>();


    }
    public class TabeInfo{
        public int parentId { get; set; }
        public string tableName { get; set; }
        public string columnCNName { get; set; } 
        public string nameSpace { get; set; } 
        public string foldername { get; set; }
        public int table_Id { get; set; } 
        public bool isTreeLoad { get; set; } = true;
    }
    public class PanelHtml
    {
        public string text { get; set; }

        public string id { get; set; }
        public string displayType { get; set; }
        public string dataSource { get; set; }
        public string columnType { get; set; }
        public bool require { get; set; }
        public bool disabled { get; set; }
        public int colSize { get; set; }
        public int fileMaxCount { get; set; }
    }

}
